import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
// import Parent from '@/components/example/parent'
import Admin from '@/components/back/management/admin/index'
import psManager from '@/components/back/ps_manager/index'
import Yunshu from '@/components/back/yunshu/index'
import YunshuAdd from '@/components/back/yunshu/add'
import Station from '@/components/back/station/index'
import ManagementMe from '@/components/front/management/index.vue'

import FRONT_YUNSHU from '@/components/front/yunshu/index'

import FrontStation from '@/components/front/station/index'

import IndexMenu from "@/components/back/common/index"
import LeftMenu from "@/components/back/common/leftMenu"

import Index from '@/components/front/index'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    }/*,
    {
      path: '/example',
      name: 'parent',
      component: Parent
    }*/,
    {
      path:'/back/management/admin',
      name:'list',
      component:Admin
    },
    {
      path:'/front/management/me',
      name:'me',
      component:ManagementMe
    },
    {
      path:'/front/station/index',
      name:'index',
      component:FrontStation
    },
    {
      path:'/back/psManager',
      name:'list',
      component:psManager
    },
    {
      path:'/back/yunshu',
      name:'list',
      component:Yunshu
    },
    {
      path:'/back/yunshu/add',
      name:'add',
      component:YunshuAdd
    },
    {
      path:'/front/yunshu',
      name:'list',
      component:FRONT_YUNSHU
    },
    {
      path:'/back/Station',
      name:'list',
      component:Station
    },
    {
      path:'/back/common/leftMenu',
      name:'leftMenu',
      component:LeftMenu
    },
    {
      path: '/index',
      name: 'Index',
      component: Index,
      children: [
        {
          path: '/front/indexParent',
          name:'首页',
          component: resolve => require(['@/components/front/index/indexParent'], resolve),
        },]
    },
    {
      path: '/back/common/index',
      name: 'indexMenu',
      component: IndexMenu ,
      children: [
        {
          path: '/back/management/admin/index',
          component: resolve => require(['@/components/back/management/admin/'], resolve),
          meta: {title: '人员管理'}
        },
        {
          path: '/back/management/rotation/index',
          component: resolve => require(['@/components/back/management/rotation/'], resolve),
          meta: {title: '轮播管理'}
        },
        {
          path: '/back/psManager/list',
          component: resolve => require(['@/components/back/ps_manager/'], resolve),
          meta: {title: '后期服务人员管理'}
        },
        {
          path: '/back/yunshu/list',
          component: resolve => require(['@/components/back/yunshu/'], resolve),
          meta: {title: '运输驾驶员管理'}
        },
        {
          path: '/back/station/list',
          component: resolve => require(['@/components/back/station/'], resolve),
          meta: {title: '站点管理'}
        },
        {
          path: '/back/user/list',
          component: resolve => require(['@/components/back/user/'], resolve),
          meta: {title: '用户信息'}
        }
      ]

    }
  ]
})
